<?php
/**
 * 优惠券逻辑层
 * @author lee
 */
namespace app\common\logic;

use app\common\model\Goods;

class Spike extends Base
{

    /**
     * 重组提交信息
     * @param  array $data 请求的信息
     */
    public function recombine($data)
    {
        $goods = Goods::field('id,sale_price,goods_thumb_id')->where('id', $data['goods_id'])->find();
//         $data['pbegin'] = strtotime($data['pbegin']);
//         $data['pend'] = strtotime($data['pend']) + (24*60*60-1);
        $data['goods_thumb_id'] = $goods['goods_thumb_id'];
        $data['sale_price'] = $goods['sale_price'];
        $data['all_num'] = $data['num'];
        return $data;
    }
}
